package cn.rocky.prepare;

/**
 * 344. 反转字符串
 */
public class reverseString {

    public void reverseString(char[] s) {
        int len = s.length;
        for (int i = 0; i < len; i++) {
            char c = s[i];
            s[i] = s[len - 1];
            s[len - 1] = c;
            len--;
        }
    }
}
